INSERT QUERY



MySQL - Insert Query


Insert statement is used to insert new records in a table.


SYNTAX :

The INSERT INTO statement can be written in the following two ways-

INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);

--You need not mention the column names

INSERT INTO table_name
VALUES (value1, value2, value3, ...);

Example :


INSERT INTO studentrecord(StudentID, StudentName, ParentName, Address, City, PostalCode, Country)
VALUES ('01', 'Sanjoshi','Jagan', 'Banjara Hills', 'Hyderabad', '500046', 'India');
 
INSERT INTO studentrecord
VALUES ('02', 'Shivarii','Pranay', 'Hamel Street', 'Kolkata', '700096', 'India');

As a result,the following table with values inserted displays:

StudentIDStudentNameParentNameAddressCityPostalCodeCountry
01SanjoshiJaganBanjara HillsHyderabad500046India
02ShivariPranayHamel StreetKolkata700096India


MySQL TRIGGERS

MySQL - Triggers

posted on 2019-11-29 21:44:07 - mysql Tutorials


Grant_ Revoke Privilege

MySQL - Grant_ Revoke Privilege

posted on 2019-11-26 23:15:04 - mysql Tutorials


MySQL Vs SQL

MySQL Vs SQL

posted on 2019-11-25 05:02:26 - mysql Tutorials


Prompt Examples

ChatGPT Prompt Examples

posted on 2023-06-21 22:37:19 - ChatGPT Tutorials


Use Cases

Chat GPT Key Use Cases

posted on 2023-06-21 21:03:17 - ChatGPT Tutorials


Prompt Frameworks

Prompt Frameworks

posted on 2023-06-21 19:33:06 - ChatGPT Tutorials